<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>MyJPetStore</title>
    <link rel="StyleSheet" href="../css/jpetstore.css" type="text/css" media="screen"/>
</head>
<body>
    <header th:replace="common/top"></header>

    <div id="Content">
        <div id="BackLink">
            <a th:href="'/catalog/viewProduct?productId=' + ${product.productId}">
                Return to <label th:text="${product.productId}">Product ID</label>
            </a>
        </div>

        <div id="Catalog">
            <table>
                <tr>
                    <td>
                        <img th:src="'../' + ${product.descriptionImage}">
                    </td>
                </tr>
                <tr>
                    <td>
                        <label th:text="${product.descriptionText}">Description</label>
                    </td>
                </tr>
                <tr>
                    <td>
                        <b id="itemId" th:text="${item.itemId}">Item ID</b>
                    </td>
                </tr>
                <tr>
                    <td>
                        <b><font size="4" th:text="${item.attribute1}">Attributes</font></b>
                    </td>
                </tr>
                <tr>
                    <td th:text="${product.name}"></td>
                </tr>
                <tr>
                    <td>
                        <label th:if="${item.quantity <= 0}">Back ordered.</label>
                        <label th:if="${item.quantity > 0}" th:text="${item.quantity} + 'in stock.'">Quantity in stock.</label>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label th:text="'$' + ${#numbers.formatDecimal(item.listPrice,1,2)}">List Price</label>
                    </td>
                </tr>

                <tr>
                    <td>
                        <a class="Button" th:href="'/cart/addItemToCart?workingItemId=' + ${item.itemId}">Add to Cart</a>
                    </td>
                </tr>
            </table>
        </div>

    </div>

    <footer th:replace="common/bottom"></footer>
</body>
</html>